

package com.kimo.shop.admin.controller;



import com.baomidou.mybatisplus.core.metadata.IPage;
import com.kimo.shop.bean.dto.PageAnalysisDto;
import com.kimo.shop.bean.param.FlowAnalysisParam;
import com.kimo.shop.common.util.PageParam;
import com.kimo.shop.service.FlowPageAnalysisService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


/**
 * @author kimo-taozhouchuan on 2018/11/26.
 */
@RestController
@RequestMapping("/admin/flowPageAnalysis")
public class FlowPageAnalysisController {

    @Autowired
    private FlowPageAnalysisService flowPageAnalysisService;


    /**
     * 分页获取页面统计数据
     */
    @GetMapping("/page")
    public ResponseEntity<IPage<PageAnalysisDto>> page(PageParam<PageAnalysisDto> page, FlowAnalysisParam flowAnalysisParam) {
        IPage<PageAnalysisDto> flowPageAnalysisParamIPage = flowPageAnalysisService.getPageOrProdAnalysis(page, flowAnalysisParam);
        return ResponseEntity.ok(flowPageAnalysisParamIPage);
    }
}
